package com.xinjie.www.dao.comment;

import com.xinjie.www.po.Comment;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface CommentDao {
    //获取评论
    public List<Comment> getComment(Connection connection, int post) throws SQLException;

    //获取管理员管理的评论
    public List<Comment> getManagerComment(Connection connection, String tieba) throws SQLException;

    //写评论
    public int writeComment(Connection connection, int postId, int userId, String content, String time) throws SQLException;

    //获取某用户的评论
    public List<Comment> getOwnComment(Connection connection,int userId) throws SQLException;

    //用户删除自己的评论
    public int deleteOwnComment(Connection connection,int commentId,int postId) throws SQLException;
}
